<!DOCTYPE html>

<html>

<head>

    <title>{$site_name}-会员中心-消费历史</title>

    <meta name="keywords" content="{$site_seo_keywords}" />

    <meta name="description" content="{$site_seo_description}">
    <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js">
    </script>
    <style>
        #my-table th{
            white-space: nowrap;
        }
        #my-table td{
            white-space: nowrap;
        }
    </style>

    <tc_include file="Public:head" />
</head>

<body class="body-white" id="top">

<tc_include file="Public:nav" />

<div class="container tc-main">

    <div class="row">

        <div class="span2">

            <tc_include file="Public:usernav"/>

        </div>

        <div class="span10">
            <ul class="nav nav-tabs">
                <li><a href="javascript:window.history.go(-1)">服务卡扣费</a></li>
                <li class="active"><a href="#">消费历史</a></li>
            </ul>

            <div class="tab-content">

                <div class="tab-pane active" id="one">

                    <if condition="5 eq $url_type">

                        <div class="form-inline" style="margin-bottom: 20px;">
                        <input type="text" name="cardnum" id="cardnum" placeholder="输入卡号" value="{$condition.cardnum}">
                            &nbsp; &nbsp;
                        <input type="text" name="name" id="name" placeholder="输入姓名" value="{$condition.name}">

                        <button class="btn" id="ss">搜索</button>

                        <br/>

                            <if condition="207 eq $usid || 210 eq $usid">
                            <form style="display:inline" action="{:leuu('User/Integral/exportintegralhis')}" enctype="multipart/form-data">
                                    <input type="hidden" name="cardnum_e" id="cardnum_e" value="{$condition.cardnum}">
                                    <input type="hidden" name="name_e" id="name_e" value="{$condition.name}">
                                <div style="margin-bottom: 20px; margin-top: 20px">
                                    <input type="text" name="begintime" placeholder="起始日期" class="js-date" > 至 <input type="text" name="endtime" placeholder="结束日期" class="js-date" >
                                    <input type="submit" class="btn" value="导出查询数据" style="width: 120px">
                                </div>
                            </form>
                            </if>
                        </div>

                    </if>
                    <div style="width: 946px;overflow-x: scroll">
                        <table class="table table-bordered table-striped table-hover" id="my-table">

                            <thead>

                            <tr>

                                <th>id</th>
                                <th>会员卡号</th>
                                <th>会员姓名</th>
                                <th>积分变动类型</th>
                                <th>积分变动金额</th>
                                <th>操作时间</th>
                                <th>操作员</th>
                                <th>备注</th>
                            </tr>

                            </thead>

                            <tbody>

                            <foreach name="hislist" item="vo">
                                <tr>
                                    <td>{$vo.id}</td>
                                    <td>{$vo.cardnum}</td>
                                    <td>{$vo.name}</td>
                                    <td>
                                        <if condition="$vo['type'] eq 1">
                                            新增
                                        </if>
                                        <if condition="$vo['type'] eq 2">
                                            消费
                                        </if>
                                    </td>
                                    <td>{$vo['integralchange']/100}</td>
                                    <td>{$vo.createtime}</td>
                                    <td>{$vo.createbyuser}</td>
                                    <td>{$vo.remark}</td>
                                </tr>

                            </foreach>

                            </tbody>

                        </table>
                    </div>

                </div>
                <div class="pagination">{$page}</div>
            </div>

        </div>

    </div>

    <tc_include file="Public:footer" />

</div>
<script>
    $(function () {
        $("#cardnum").change(function () {
            $("#cardnum_e").val($("#cardnum").val());
        });
        $("#name").change(function () {
            $("#name_e").val($("#name").val());
        });

        $("#ss").click(function () {
             window.location.href="/user/integral/integralhis.html?cardnum="+$("#cardnum").val()+"&name="+$("#name").val();
        });
    })
</script>
<!-- /container -->

<tc_include file="Public:scripts" />

</body>

</html>